<template>
  <div class="month-data">
    <el-card class="month">
      <div slot="header">
        每月数据
      </div>
      <el-table :data="data">
        <el-table-column prop="date" label="时间" />
        <el-table-column prop="number" label="红包总数" />
        <el-table-column prop="money" label="红包金额">
          <template slot-scope="scope">
            {{ scope.row.money }}元
          </template>
        </el-table-column>
      </el-table>
    </el-card>
  </div>
</template>

<script>
export default {
  name: 'MonthData',
  data() {
    return {
      data: []
    }
  },
  mounted() {
    this.getData()
  },
  methods: {
    getData() {
      this.$get('home/getMonth')
        .then((res) => {
          this.data = res.data.data
        })
    }
  }
}
</script>

<style scoped lang="scss">
  .month{
    height: 310px;
    overflow-y: auto;
  }
</style>
